package org.csmzxy.class2334;

import java.util.Scanner;
public class shuixianhuashu {
    public static void main (String[] args){
        Scanner scanner =new Scanner(System.in);
        System.out.print("请输入一个数：");
        int num = scanner.nextInt();
        if (num >= 100 && num <= 999)
        {
            int a = num / 100;
            int b = (num /10) % 10;
            int c = num % 10;
            if (num == (a * a * a + b * b * b + c * c * c))
            {
                System.out.print("是水仙花数");
            }
            else{
                System.out.print("不是水仙花数");
            }
            System.out.print("输入的数不是三位数，请重新输入");
        }
        scanner.close();
    }

}
